package org.smog.core.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;

/**
 * 带String 类型UUDId和创建,更新时间的实体基类
 *
 * @Description: Created by IntelliJ IDEA.
 * @project_name: smogTemp
 * @time: 2020-05-15 16:42
 * @email: 17685306043@163.com
 * @author: huangZhongYao
 */
@Data
public abstract class AbstractUUIDAndTimeEntity extends AbstractUUIDEntity {
    private static final long serialVersionUID = 4450803647305972582L;
    @TableField(
            value = "create_time",
            fill = FieldFill.INSERT, jdbcType = JdbcType.TIMESTAMP
    )
    private Date createTime;

    @TableField(
            value = "update_time",
            fill = FieldFill.INSERT_UPDATE, jdbcType = JdbcType.TIMESTAMP
    )

    private Date updateTime;
}
